Skip to content

Add example of limiting particle timestep by local cfl in schism tuto… - #3016

Open
fluidnumericsJoe wants to merge 5 commits into
mainfrom
feature/cfl-limited-dt-tutorial-update
Open

fluidnumericsJoe wants to merge 5 commits into
mainfrom
feature/cfl-limited-dt-tutorial-update

Conversation

@fluidnumericsJoe

Copy link
Copy Markdown
Contributor

Description

This PR adds an example of limiting particle timestep by local cfl in schism tutorial

Checklist

  • This PR targets the correct branch (main for normal development, v3-support for v3 support)

@erikvansebille erikvansebille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this extra context, @fluidnumericsJoe! Below a few small comments (I can't put comments directly on the notebook in GitHub)

  1. Is "altitude" the right word in the comment of cell [5]? That to me suggests (3D) height?
  2. Avoid variable names like h, e and p in that same cell - make them more explicit so users understand what's going on?
  3. CFL number hasn't been introduced in cell [5]. Could you move that whole cell down to the section of cell [9]? That will also make it easier to refer to this part of the tutorial directly, because all information is in one subsection
  4. Make explicit that the math symbol $C$ is the same as CFL_target
  5. Should we add a link to the CFL-section on the tutorial_dt_integrators too?

@github-project-automation github-project-automation Bot moved this from Backlog to Ready in Parcels development Oct 28, 2026
@fluidnumericsJoe

Copy link
Copy Markdown
Contributor Author
  1. "Altitude": reworded. The text now describes the cell width as the shortest distance from a corner of the triangle to the opposite edge (twice the area divided by the longest edge), and notes that this is one of several valid measures.

  2. Variable names: p, e, h are now corners (points), edges, edge_lengths, cell_area and cell_width, both in that cell and in the kernel and release cells.

  3. Moving the cell: the cell-width code now lives in the "Limit the timestep by the local CFL number" section, together with the kernel. It opens by introducing the CFL number, $C = |u|,\Delta t/\Delta x$. To make the move possible, cell_width is no longer part of the velocity UxDataset. Instead it's built as its own small FieldSet and added with fieldset = fieldset + .... this doesn't seem to impact runtime for this example

  4. $C$ vs CFL_target: now stated explicitly: "with $C$ = CFL_target and $\Delta x$ = cell_width". There's also a sentence on how fieldset.add_context makes CFL_target available in the kernel.

  5. Link to tutorial_dt_integrators: added. I linked to "A priori estimation of dt", which makes the same $U,\Delta t < \Delta x$ argument for a structured grid.

@erikvansebille erikvansebille left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making these updates, however I don't see the link back from the dt_integration notebook to this notebook?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready

Development

Successfully merging this pull request may close these issues.

2 participants